//
//  HSCommonFile.swift
//  SchoolDemo
//
//  Created by rimi on 16/9/27.
//  Copyright © 2016年 YQ. All rights reserved.
//

import UIKit

let screenW = UIScreen.main.bounds.width
let screenH = UIScreen.main.bounds.height

///服务器IP地址的存储KEY
let xx_ipKey: String = "ipText"

///baseURL

var baseURLStr: String? {
    guard let saveIp = UserDefaults.standard.value(forKey: xx_ipKey) as? String else {
        
        return nil
    }
    return saveIp + "zao/interface/"
}
///登录状态KEY
let islogin: String = "isLogin"

///获得用户信息的保存路径
let saveUserInfoPath = (NSSearchPathForDirectoriesInDomains(FileManager.SearchPathDirectory.documentDirectory, FileManager.SearchPathDomainMask.userDomainMask, true).last ?? "")  + "/userInfoFile.plist"

//获得保存的用户信息数据
//因为保证任何地方都可以获取最新的的信息，需要使用计算型
var userInfo : NSDictionary {
return NSDictionary(contentsOfFile: saveUserInfoPath)?["data"] as! NSDictionary
}

//计算视图的宽度
let repalyViewW: CGFloat = screenW - (50 + 8 * 3)
